package com.example.rocketconsumerdemo.mq;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RocketMQMessageListener(topic = "topic_clTest01", consumerGroup = "cl_group_1")
public class ConsumerCL implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        log.info("从消息队列中获取到的消息为：{}",s);
    }
}
